package com.ht.aems.fesmodel;

import java.util.Map;

/**
* Interface IUnitManager
* @author Dong Shufeng
* @Date: 2006-3-11
* @version 1.0
*/
public interface IUnitManager {

    /**
     * get unit managed by this manager
     * @param name Object's name as a key
     * @return object
     */
    public AbstractUnit getUnit(String name);


    /**
     * get all units managed by this manager
     * @return map of units
     */
    public Map<String,AbstractUnit> getAllUnits();

    /**
     * add unit to be managed
     * @param unit
     */
    public void addUnit(AbstractUnit unit);

    /**
     * @param unitName name of unit as a key
     * @return whether contains this unit
     */
    public boolean contains(String unitName);

    /**
     * remove unit whose name is given if contains this unit
     * @param name
     */
    public AbstractUnit removeUnit(String name);

    /**
     * modify unit
     * @param name name of unit
     * @param unit
     */
    public boolean modifyUnit(String name, AbstractUnit unit);
}